package com.carrental.search.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import javax.annotation.PostConstruct;
import java.util.HashMap;
import java.util.Map;

/**
 * Elasticsearch模拟配置类
 * 提供Elasticsearch服务的模拟实现，用于开发和测试环境
 */
@Slf4j
@Configuration
public class ElasticsearchMockConfig {

    @PostConstruct
    public void init() {
        log.info("初始化Elasticsearch模拟配置");
    }

    /**
     * 提供模拟数据存储
     * 
     * @return 模拟数据存储
     */
    @Bean
    @Primary
    public Map<String, Object> mockDataStore() {
        return new HashMap<>();
    }
} 